Skip to content

Title: feat(cli): implement trigger and whoami commands#19

Open
thegreatalxx wants to merge 2 commits intopolarsource:mainfrom
thegreatalxx:feat/trigger-command
Open

Title: feat(cli): implement trigger and whoami commands#19
thegreatalxx wants to merge 2 commits intopolarsource:mainfrom
thegreatalxx:feat/trigger-command

Conversation

@thegreatalxx
Copy link
Copy Markdown

Description

This PR introduces two new commands to the Polar CLI to enhance the local development experience: trigger and whoami.

New Features

  1. polar trigger <event> <url>

    • Simulates mock webhook events and sends them to a local endpoint.
    • Supported events: subscription.created, order.created, and benefit.granted.
    • Includes realistic mock payloads and standard Polar webhook headers.
    • Greatly simplifies testing local webhook handlers without needing to trigger real events in the dashboard.
  2. polar whoami

    • Displays the currently authenticated user's email.
    • Lists all organizations the user has access to.
    • Shows the active environment (Production/Sandbox).
    • Useful for session verification and multi-org management.

Implementation Details

  • Both commands are built using the existing effect and @effect/cli architecture.
  • Follows the established service patterns for API interaction and environment selection.
  • Includes clear, colored terminal output for better readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant